package com.dingup.paike.feign.client.subject;

import com.dingup.api.adapter.user.SysUserAdapter;
import com.dingup.api.model.sys.SysSubject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by wancheng on 2018/11/29.
 */
@Component
@FeignClient(value = "p-innermgrweb")
public interface SubjectFeignClient {
    /**
     * 获取全部指定分科
     *
     * @return
     */
    @RequestMapping(value = "/feign/sys/subject/get_all_sys_subject.do", method = RequestMethod.POST)
    public List<SysSubject> getAllSysSubject();

    /**
     * 通过科目获取老师信息
     *
     * @param sysSubjectId
     * @return
     */
    @RequestMapping(value = "/feign/sys/subject/get_user_by_subject_id.do", method = RequestMethod.POST)
    public List<SysUserAdapter> getUserBySubjectId(@RequestParam(value = "sysSubjectId", required = false) Integer sysSubjectId);
}
